package cn.antblog.thread;

/**
 * @author YangJingyi
 * @date 2021-09-14 17:01
 * 继承 Thread 类实现 多线程
 */
public class ThreadClass extends Thread {


    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("兔子跑了"+i+"步");
        }
    }


}

class Tortoise extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("乌龟跑了"+i+"步");
        }
    }
}